<%@ page language="java" contentType="text/html; charset=UTF-8"
    import="com.jju.A1541.model.*"
    import="com.jju.A1541.dao.*"
    pageEncoding="UTF-8"%>
    
<jsp:useBean id="user1"  class="com.jju.A1541.model.User1">
</jsp:useBean>
<jsp:setProperty   name="user1"   property="*"  />  
    
<%
    //设置传递过来的数据采用的编码
     request.setCharacterEncoding("UTF-8");
      //设置传递过来的数据采用的编码
      request.setCharacterEncoding("UTF-8");
      //1.获得用户在表单里面输入的数据
      //2.构造一个商品分类对象并对各个属性赋值
      out.println("username:"+user1.getUsername()+
    		  "uname:"+user1.getUname()+
    		  "sex:"+user1.getSex()+
    		  "ejxy:"+user1.getEjxy()+
    		  "grjj:"+user1.getGrjj());
      //3.调用CatogoryDAO的edit方法，完成对象的持久化
      int n = User1DAO.edit(user1);
      //4.对结果进行判断
      if(n>0){
    	           response.sendRedirect("my.jsp");
      }else{
    	           out.print("保存失败!");
      }
 
%>